package com.scy.edu.server;

/**
 * @author 司晨雨
 * @date 2020/6/28 21:58
 * @description
 */
public abstract class HttpServlet implements Servlet {

    public abstract void doGet(Request request,Response response) throws Exception;

    public abstract void doPost(Request request,Response response) throws Exception;

    @Override
    public void service(Request request, Response response) throws Exception {
        if("GET".equalsIgnoreCase(request.getMethod())){
            doGet(request, response);
        }else {
            doPost(request, response);
        }



    }
}
